package com.ddx.dao;

import com.ddx.pojo.ShoppingSpec;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShoppingSpecMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ShoppingSpec record);

    int insertSelective(ShoppingSpec record);

    ShoppingSpec selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShoppingSpec record);

    int updateByPrimaryKey(ShoppingSpec record);

    List<ShoppingSpec> selectByRecord(ShoppingSpec record);

    List<ShoppingSpec> selectSpecByProductId(String productId);

    ShoppingSpec selectByPrimaryKeyForUpdate(Integer id);

    Integer sumSpecStock(@Param("productId") String productId);

    int updateStockByRecord(ShoppingSpec record);
}